﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ChurchDiary.TableEntity
{
    [Table("CH_PageSectionPk")]
    public class EntityPageSectionPk : BaseEntity
    {
        [Key]
        public Guid PageSectionId { get; set; }
        public string PageSectionName { get; set; }

        public List<EntityPageSection> PageSections { get; set; }
    }

    [Table("CH_PageSection")]
    public class EntityPageSection : BaseEntity
    {
        [Key]
        public Guid PageSection { get; set; }
        public Guid PageSectionId { get; set; }
        public Guid LanguageId { get; set; }
        public string TemplateContent { get; set; }
        public string TemplateUrl { get; set; }

        public EntityPageSectionPk PageSectionPk { get; set; }
        public EntityLanguage Language { get; set; }
    }

    [Table("CH_PageSectionAssignment")]
    public class EntityPageSectionAssignment : BaseEntity
    {
        [Key]
        public Guid PageSectionAssignmentId { get; set; }
        public int PageId { get; set; }
        public Guid PageSectionId { get; set; }
        public int Ordinal { get; set; }
        public int CurrentStatus { get; set; }

        public EntityPage Page { get; set; }
        public EntityPageSectionPk PageSection { get; set; }
        public List<EntityPageSectionPk> PageSections { get; set; }
    }

    [Table("CH_Page")]
    public class EntityPage : BaseEntity
    {
        [Key]
        public int PageId { get; set; }
        public string ControllerName { get; set; }
        public string ActionName { get; set; }
        public string PageTitle { get; set; }
        public string PageName { get; set; }
        /// <summary>
        /// 1.Active
        /// 2.UnderContruction
        /// 3.Depricated
        /// </summary>
        public int CurrentStatus { get; set; }
        public string PageDescription { get; set; }

        public List<EntityPageSection> PageSection { get; set; }
    }

}
